{__NOLAYOUT__}<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>HQ管理系统 V2.0 - http://www.huangqing.net</title>
    <link rel="stylesheet" href="/static/zui/css/zui.min.css">
    <link rel="stylesheet" href="/static/zui/css/zui-theme-green.css">
    <link rel="stylesheet" href="/static/my/css/common.css">
</head>
<body class="hl-default myLoginBg">
<div class="container-fluid">
    <div class="row">
        <div class="myLogin
         col-lg-4 col-lg-offset-4
         col-md-4 col-md-offset-4
         col-sm-4 col-sm-offset-4">
            <div class="" align="center"><img src="/static/my/img/login_logo_bg.png"></div><br>
            <div class="panel">
                <div class="panel-body">
                    <form method="post" id="loginForm">
                        <fieldset>
                            <div class="form-group">
                                <label>用户名：</label>
                                <input type="text" class="form-control" placeholder="请输入用户名或者手机号码" name="username" id="username">
                            </div>
                            <div class="form-group">
                                <label>密码：</label>
                                <input type="password" class="form-control" placeholder="请输入密码" name="password" id="password">
                            </div>
                            <div class="form-group">
                                <div class="checkbox">
                                    <label>
                                        <input type="checkbox" id="remember" checked> 记住密码
                                    </label>
                                </div>
                            </div>
                        </fieldset>
                        <button type="submit" class="btn btn-primary btn-block">登录</button>
                        <!--a href="/member/login/register/" class="btn btn-block">注册账号</a-->
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="/static/jquery/jquery.min.js"></script>
<script src="/static/zui/js/zui.min.js"></script>
<script src="/static/zui/lib/datetimepicker/datetimepicker.min.js"></script>
<script src="/static/layer/layer.js"></script>
<script src="/static/select2/js/select2.full.min.js"></script>
<script src="/static/my/js/common.js"></script>
<script>
    $(function () {
        $('#loginForm').myForm(function (ret) {
            var isCkd = $('#remember').prop('checked');
            if (isCkd) {
                // 将用户名密码保存起来
                var memberLogin = {
                    username: $('#username').val(),
                    password: $('#password').val()
                };
                window.localStorage.setItem('memberLogin', JSON.stringify(memberLogin))
            }
            // 跳转
            window.location.href = ret.url;
        });
        // 自动填空
        var memberLogin = window.localStorage.getItem('memberLogin');
        if (memberLogin) {
            memberLogin = JSON.parse(memberLogin);
            $('#username').val(memberLogin.username);
            $('#password').val(memberLogin.password);
            $('#remember').prop('checked', true);
//            $('#loginForm').submit();
        }
        // 清除记录
        $('#remember').on('click', function () {
            window.localStorage.setItem('memberLogin', '');
        });

    });

</script>
</body>
</html>